<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        /* 
            再算数运算中，先将变量转换为Number再计算
            特殊：再+运算中，如果又一遍为字符串，+起到拼接符的作用，结果为字符串
         */
        var a = 1;
        var b = true;
        var c = "hello"
        var str = a-b;
        //var str=Number(a)-Number(b);
        console.log(str);//结果为0
        var str2=a-c;
        console.log(str2);//结果为NaN

        var str3=b-c;
        console.log(str3);//结果为NaN
    </script>
</body>

</html>